<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        var arr = [10, 20, 30, 40];
        //数组扩展运算符，可以将数组展开
        console.log(...arr);

        //应用场景
        console.log(Math.max(...arr))

        var arr1 = [10,20,30,40];
        var arr2 = [50,60,70,80];
        
        console.log(arr.concat(arr2));
        console.log([...arr1, ...arr2]);
        


    </script>
</body>
</html>